x86/hvm: add vcpu parameter to guest memory copy function
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 9 Feb 2017 10:02:11 +0000 (11:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Feb 2017 10:05:39 +0000 (11:05 +0100)
commitea4e7040eedd81704a6f3ff5fa2e6d6e0bb374c9
treeaaae78ad5fe013c56508fbbe81e7b680cf476974
parent50a498c8baed284455eca283d3852ccaa1d4ce2e
x86/hvm: add vcpu parameter to guest memory copy function

Current __hvm_copy assumes that the destination memory belongs to the current
vcpu, but this is not always the case since for PVHv2 Dom0 build hvm copy
functions are used with current being the idle vcpu. Add a new vcpu parameter
to hvm copy in order to solve that. Note that only hvm_copy_to_guest_phys is
changed to take a vcpu parameter, because that's the only one at the moment
that's required in order to build a PVHv2 Dom0.

While there, also assert that the passed vcpu belongs to a HVM guest.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Fix the build, retaining prior log message attributes.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/intercept.c
xen/arch/x86/hvm/vmx/realmode.c
xen/include/asm-x86/hvm/support.h